package org.example.mbg.model;

import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;

public class TIdGenerator implements Serializable {
    private Integer id;

    @ApiModelProperty(value = "英文key")
    private String keyName;

    @ApiModelProperty(value = "规则格式。no_cycle没有周期, year_cycle 年周期, month_cycle月周期, day_cycle 日周期")
    private String ruleFormat;

    @ApiModelProperty(value = "格式[yyyy]表示年,[mm]标识月,[dd]表示日,[nnn]表示三位数字")
    private String ruleType;

    @ApiModelProperty(value = "初始值")
    private Integer initNumber;

    @ApiModelProperty(value = "上次产生的id, 默认为空")
    private Integer lastNumber;

    @ApiModelProperty(value = "备注")
    private String remark;

    private Date updateTime;

    private Date createTime;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getKeyName() {
        return keyName;
    }

    public void setKeyName(String keyName) {
        this.keyName = keyName;
    }

    public String getRuleFormat() {
        return ruleFormat;
    }

    public void setRuleFormat(String ruleFormat) {
        this.ruleFormat = ruleFormat;
    }

    public String getRuleType() {
        return ruleType;
    }

    public void setRuleType(String ruleType) {
        this.ruleType = ruleType;
    }

    public Integer getInitNumber() {
        return initNumber;
    }

    public void setInitNumber(Integer initNumber) {
        this.initNumber = initNumber;
    }

    public Integer getLastNumber() {
        return lastNumber;
    }

    public void setLastNumber(Integer lastNumber) {
        this.lastNumber = lastNumber;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", keyName=").append(keyName);
        sb.append(", ruleFormat=").append(ruleFormat);
        sb.append(", ruleType=").append(ruleType);
        sb.append(", initNumber=").append(initNumber);
        sb.append(", lastNumber=").append(lastNumber);
        sb.append(", remark=").append(remark);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", createTime=").append(createTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}